/**
 * @file    drv_gpt.h
 * @brief 	通用定时器
 * @author  Liu wei
 * @version 1.0.1
 * @date    2023-04-17
 * 
 * @copyright Copyright (c) 2023 JBD-Energy Storage Technology Co. LTD
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version   <th>Author   <th>Description
 * <tr><td>2023-04-17 <td>1.0.1     <td>Liuwei   <td>首次创建
 * </table>
 */

#ifndef __DRV_GPT_H_
#define __DRV_GPT_H_

/* File Includes -------------------------------------------------------------*/
#include <stdint.h>
/* Cplusplus -----------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif

/* Macro/Define/Typedef ------------------------------------------------------*/
/**
 * @brief GPT 编号
 */
enum
{
		DRV_GPT0 ,
		DRV_GPT1 ,
		DRV_GPT2 ,
		DRV_GPT3 ,
	
		DRV_GPT_MAX,
};

typedef void(*drv_gpt_cb_func)(uint32_t);

/* @brief */

/* Variables -----------------------------------------------------------------*/

/*******************************************************************************
* define Interface module
*
*//*! @addtogroup API LIST 
*******************************************************************************/
uint8_t drv_gpt_init(uint8_t dpt_id, uint32_t cycle , drv_gpt_cb_func pfunc);
void drv_gpt0_irq(void);
void drv_gpt1_irq(void);
void drv_gpt2_irq(void);
void drv_gpt3_irq(void);

/*! @} End of Interface API List */

#ifdef __cplusplus
}
#endif

#endif  /* #ifndef __DRV_GPT_H_ */

/********** Copyright (c) 2023 JBD-Energy Storage Technology Co. LTD *********/
